package com.jiangli.controller.admin;

import com.github.pagehelper.Page;
import com.jiangli.dto.SysOperationLogQueryDTO;
import com.jiangli.entity.SysOperationLog;
import com.jiangli.mapper.SysOperationLogMapper;
import com.jiangli.result.PageResult;
import com.jiangli.result.Result;
import com.jiangli.service.SysOperationLogService;
import com.jiangli.vo.SysOperationLogVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/Log")
@Slf4j
@Api(tags = "管理端日志接口")
public class OperationLogController {
    private final SysOperationLogService sysOperationLogService;


    public OperationLogController(SysOperationLogService sysOperationLogService
                                                                                ) {
        this.sysOperationLogService = sysOperationLogService;

    }
    @GetMapping
    @ApiOperation("获取操作记录")
    public Result<PageResult> getSysOperation (SysOperationLogQueryDTO sysOperationLogQueryDTO) {
        PageResult pageResult = sysOperationLogService.getSysOperation(sysOperationLogQueryDTO);
        return Result.success(pageResult);
    }
}
